package com.igeek.base.ch02;

import java.util.Scanner;

/**
 * @Description TODO
 * @Author chenmin
 * @Date 2024/7/10 10:22
 */
public class Demo2 {
    public static void main(String[] args) {
        Scanner input= new Scanner(System.in);
        System.out.print("请输入第一个数字:");
        int a =input.nextInt();
        System.out.print("请输入第二个数字:");
        int b =input.nextInt();
        System.out.print("请输入运算符号:");
        String c =input.next();
        switch(c){
            case "+" : System.out.println(a+c+b+"="+(a+b));break;
            case "-" : System.out.println(a+c+b+"="+(a-b));break;
            case "*" : System.out.println(a+c+b+"="+(a*b));break;
            case "/" : System.out.println(a+c+b+"="+(a/b));break;
            default: System.out.println("提示：不存在字符");break;
        }
    }
}
